package com.sky.controller.user;

import com.sky.constant.CommonConstant;
import com.sky.result.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("userShopController")
@RequestMapping("/user/shop")
@Api(tags = "C端-套餐浏览接口")
public class ShopController {
    @Autowired
    @Qualifier("redisTemplate")
    private RedisTemplate template;

    @GetMapping("/status")
    public Result<Integer> getStatus(){
        Integer status = (Integer) template.opsForValue().get(CommonConstant.SHOP_STATUS);
        return Result.success(status);
    }
}
